package com.squirrel.serialportcore.common;

import gnu.io.SerialPort;

import java.util.HashMap;
import java.util.Map;

/**
 * 串口数据存储
 *
 * @author Squbi
 * @date 2021/2/25 9:50
 */
public class ContentBase {
    private ContentBase() {
    }

    /**
     * serialPortMap 串口集合 <String,SerialPort> 串口名/对应串口
     * serialPortProperties 串口属性配置集合 <String, SerialPortProperties> 串口名/对应属性配置
     *
     * @author Squbi
     * @date 2021/3/20 9:24
     */

    private static Map<String, SerialPort> serialPortMap = new HashMap<>();

    private static Map<String, SerialPortProperties> serialPortProperties = new HashMap<>();

    /**
     * ---------------------------------------------------
     */

    public static Map<String, SerialPort> getSerialPortMap() {
        return serialPortMap;
    }

    public static void setSerialPortMap(Map<String, SerialPort> serialPortMap) {
        ContentBase.serialPortMap = serialPortMap;
    }

    public static Map<String, SerialPortProperties> getSerialPortProperties() {
        return serialPortProperties;
    }

    public static void setSerialPortProperties(Map<String, SerialPortProperties> serialPortProperties) {
        ContentBase.serialPortProperties = serialPortProperties;
    }
}
